package com.ruoyi.dangerControl.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.dangerControl.mapper.SysUser20231012Mapper;
import com.ruoyi.dangerControl.domain.SysUser20231012;
import com.ruoyi.dangerControl.service.ISysUser20231012Service;

/**
 * 用户Service业务层处理
 * 
 * @author lth
 * @date 2023-12-15
 */
@Service
public class SysUser20231012ServiceImpl implements ISysUser20231012Service 
{
    @Autowired
    private SysUser20231012Mapper sysUser20231012Mapper;

    /**
     * 查询用户
     * 
     * @param id 用户主键
     * @return 用户
     */
    @Override
    public SysUser20231012 selectSysUser20231012ById(String id)
    {
        return sysUser20231012Mapper.selectSysUser20231012ById(id);
    }

    /**
     * 查询用户列表
     * 
     * @param sysUser20231012 用户
     * @return 用户
     */
    @Override
    public List<SysUser20231012> selectSysUser20231012List(SysUser20231012 sysUser20231012)
    {
        return sysUser20231012Mapper.selectSysUser20231012List(sysUser20231012);
    }

    /**
     * 新增用户
     * 
     * @param sysUser20231012 用户
     * @return 结果
     */
    @Override
    public int insertSysUser20231012(SysUser20231012 sysUser20231012)
    {
        sysUser20231012.setCreateTime(DateUtils.getNowDate());
        return sysUser20231012Mapper.insertSysUser20231012(sysUser20231012);
    }

    /**
     * 修改用户
     * 
     * @param sysUser20231012 用户
     * @return 结果
     */
    @Override
    public int updateSysUser20231012(SysUser20231012 sysUser20231012)
    {
        sysUser20231012.setUpdateTime(DateUtils.getNowDate());
        return sysUser20231012Mapper.updateSysUser20231012(sysUser20231012);
    }

    /**
     * 批量删除用户
     * 
     * @param ids 需要删除的用户主键
     * @return 结果
     */
    @Override
    public int deleteSysUser20231012ByIds(String[] ids)
    {
        return sysUser20231012Mapper.deleteSysUser20231012ByIds(ids);
    }

    /**
     * 删除用户信息
     * 
     * @param id 用户主键
     * @return 结果
     */
    @Override
    public int deleteSysUser20231012ById(String id)
    {
        return sysUser20231012Mapper.deleteSysUser20231012ById(id);
    }
}
